﻿#pragma once

#include "./DifferenceOfNormalsEstimationModel.h"
#include "pcl/includePcl.h"
#include "../common/BasePclProvider.h"

/// <summary>
/// DifferenceOfNormalsEstimationProvider
/// </summary>
class DifferenceOfNormalsEstimationProvider : public BasePclProvider
{
    Q_OBJECT

public:
    DifferenceOfNormalsEstimationProvider();

public:
    void initEditor(QtTreePropertyBrowser* editor);
    void valueChanged(QtProperty*, double) override;
    void valueChanged(QtProperty*, QString) override;
    void valueChanged(QtProperty*, int) override;
    void valueChanged(QtProperty*, bool) override;
    void valueChanged(QtProperty*, const QColor&) override;
    void close() override;
    void doLoadPcd();
    void doAction();

private:
    /**
     * @brief Difference of Normals Based Segmentation
     * https://pcl.readthedocs.io/projects/tutorials/en/master/don_segmentation.html
     * data: https://www.cvlibs.net/datasets/kitti/
     * @param cloud
     * @return
     */

    void impl(pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud, DifferenceOfNormalsEstimationModel& model);
};
